#include "myui.h"
#include "ui_myui.h"

MyUi::MyUi(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::MyUi)
{
    ui->setupUi(this);
    connect(ui->spinBox,&QSpinBox::valueChanged,this,[=](int val){
        ui->horizontalSlider->setSliderPosition(val);
    });

    connect(ui->horizontalSlider,&QSlider::sliderMoved,this,[=](int val){
        ui->spinBox->setValue(val);
    });

}

MyUi::~MyUi()
{
    delete ui;
}
